<!DOCTYPE html>
<!--名称空间-->
<!--suppress ALL-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Thymeleaf 内置方法</title>
</head>
<body>
<h2 style="color: slategray">#strings </h2>
<div th:if="${not #strings.isEmpty(itdragonStr)}">
    <p>Old Str : <span th:text="${itdragonStr}"/></p>
    <p>toUpperCase : <span th:text="${#strings.toUpperCase(itdragonStr)}"/></p>
    <p>toLowerCase : <span th:text="${#strings.toLowerCase(itdragonStr)}"/></p>
    <p>equals : <span th:text="${#strings.equals(itdragonStr, 'itdragonblog')}"/></p>
    <p>equalsIgnoreCase : <span th:text="${#strings.equalsIgnoreCase(itdragonStr, 'itdragonblog')}"/></p>
    <p>indexOf : <span th:text="${#strings.indexOf(itdragonStr, 'r')}"/></p>
    <p>substring : <span th:text="${#strings.substring(itdragonStr, 2, 8)}"/></p>
    <p>replace : <span th:text="${#strings.replace(itdragonStr, 'it', 'IT')}"/></p>
    <p>startsWith : <span th:text="${#strings.startsWith(itdragonStr, 'it')}"/></p>
    <p>contains : <span th:text="${#strings.contains(itdragonStr, 'IT')}"/></p>
</div>

<h2 style="color: slategray">#numbers </h2>
<div>
    <p>formatDecimal 整数部分随意，小数点后保留两位，四舍五入: <span th:text="${#numbers.formatDecimal(itdragonNum, 0, 2)}"/></p>
    <p>formatDecimal 整数部分保留五位数，小数点后保留两位，四舍五入: <span th:text="${#numbers.formatDecimal(itdragonNum, 5, 2)}"/></p>
</div>

<h2 style="color: slategray">#bools </h2>
<div th:if="${#bools.isTrue(itdragonBool)}">
    <p th:text="${itdragonBool}"></p>
</div>

<h2 style="color: slategray">#arrays </h2>
<div th:if="${not #arrays.isEmpty(itdragonArray)}">
    <p>length : <span th:text="${#arrays.length(itdragonArray)}"/></p>
    <p>contains : <span th:text="${#arrays.contains(itdragonArray, 5)}"/></p>
    <p>containsAll : <span th:text="${#arrays.containsAll(itdragonArray, itdragonArray)}"/></p>
</div>
<h2 style="color: slategray">#lists </h2>
<div th:if="${not #lists.isEmpty(itdragonList)}">
    <p>size : <span th:text="${#lists.size(itdragonList)}"/></p>
    <p>contains : <span th:text="${#lists.contains(itdragonList, 0)}"/></p>
    <p>sort : <span th:text="${#lists.sort(itdragonList)}"/></p>
</div>
<h2 style="color: slategray">#maps </h2>
<div th:if="${not #maps.isEmpty(itdragonMap)}">
    <p>size : <span th:text="${#maps.size(itdragonMap)}"/></p>
    <p>containsKey : <span th:text="${#maps.containsKey(itdragonMap, 'thName')}"/></p>
    <p>containsValue : <span th:text="${#maps.containsValue(itdragonMap, '#maps')}"/></p>
</div>
<h2 style="color: slategray">#dates </h2>
<div>
    <p>format : <span th:text="${#dates.format(itdragonDate)}"/></p>
    <p>custom format : <span th:text="${#dates.format(itdragonDate, 'yyyy-MM-dd HH:mm:ss')}"/></p>
    <p>day : <span th:text="${#dates.day(itdragonDate)}"/></p>
    <p>month : <span th:text="${#dates.month(itdragonDate)}"/></p>
    <p>monthName : <span th:text="${#dates.monthName(itdragonDate)}"/></p>
    <p>year : <span th:text="${#dates.year(itdragonDate)}"/></p>
    <p>dayOfWeekName : <span th:text="${#dates.dayOfWeekName(itdragonDate)}"/></p>
    <p>hour : <span th:text="${#dates.hour(itdragonDate)}"/></p>
    <p>minute : <span th:text="${#dates.minute(itdragonDate)}"/></p>
    <p>second : <span th:text="${#dates.second(itdragonDate)}"/></p>
    <p>createNow : <span th:text="${#dates.createNow()}"/></p>
</div>
</body>
</html>